package com.web.server.common.message;

import com.google.gson.Gson;

import java.io.Serializable;

/**
 * Created by Hack on 2016/11/17.
 * 可标识的消息
 */
public abstract class AbstractIdentifiableMessage implements Serializable {
    private String messageID;

    public AbstractIdentifiableMessage(String messageID) {
        this.messageID = messageID;
    }

    public String getMessageID() {
        return messageID;
    }

    public void setMessageID(String messageID) {
        this.messageID = messageID;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
